From 047923da523a118caf6c3837a1205f3d3b7137d7 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 30 Jun 2006 10:07:38 +0100 Subject: [PATCH] evtchn_do_upcall() has a micro optimization which is depends on that xchg is a barrier. However xchg of IA64 has acquire semantics so that event channel notification is lost sometimes. This patch fixes it. Signed-off-by: Isaku Yamahata --- linux-2.6-xen-sparse/drivers/xen/core/evtchn.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c b/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c index 7d57e105a4..69541c6aa5 100644 --- a/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c +++ b/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c @@ -219,7 +219,10 @@ asmlinkage void evtchn_do_upcall(struct pt_regs *regs) vcpu_info->evtchn_upcall_pending = 0; - /* NB. No need for a barrier here -- XCHG is a barrier on x86. */ +#ifndef CONFIG_X86 /* No need for a barrier -- XCHG is a barrier on x86. */ + /* Clear master pending flag /before/ clearing selector flag. */ + rmb(); +#endif l1 = xchg(&vcpu_info->evtchn_pending_sel, 0); while (l1 != 0) { l1i = __ffs(l1); -- 2.30.2